﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Runtime.Remoting;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using MinGuiLuo.Generic;
using UtilityLibrary.WinControls;

namespace WinFromDevelopFramework
{
    //http://hi.baidu.com/550802356/item/af7e1bd9e332c1f0ca0c393e
    public partial class ToolboxFrm : BaseFrm
    {
        private MainFrm m_mainFrm;
        public ToolboxFrm(MainFrm mainfrm)
        {
            InitializeComponent();
            this.m_mainFrm = mainfrm;
        }
        private void ToolboxFrm_Load(object sender, EventArgs e)
        {
            Singleton<OutlookBarHelper>.Instance.StartupEntityPlugins(outlookBar1);
            outlookBar1.ItemClicked += new OutlookBarItemClickedHandler(OnOutlookBarItemClicked);
        }
        private void OnOutlookBarItemClicked(OutlookBarBand band, OutlookBarItem item)
        {
            if (item.Tag != null)
            {
                var type = (Type)item.Tag;
                m_mainFrm.ShowContent(item.Text, type);
            }
        }
    }
}
